<!DOCTYPE html>
<html lang="en">

<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>
    <script>
        function removeRepeat(arr) {
            // var arr = new Array(1, 23, 12, 31, 231, 321, 123, 123, 22, 22, 1);
            var obj = {};
            var newArr = [];
            for (var i = 0; i < arr.length; i++) {
                if (!obj[arr[i]]) {
                    obj[arr[i]] = 1;
                    newArr.push(arr[i]);
                }
            }
        }
        
    </script>
</body>

</html>